var NodeRSA = require("node-rsa");
const _priKey = 
`
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAM9tl/kp4L23saVc
JDtIz+9o/lxPtAcfLwr+wbdOtvv1qeHc8BL5i3ZTPmKVYin8R3wo5KbiOcTz04FB
MwZ5PM+cM/gfVAEOQhLdsc/h5dsxaG2v3eY414WKvervdKYjfz0LdOHMPFsJDuNZ
+qAZKvH1LEGHP5LwTmIi8LoD7I4JAgMBAAECgYEAx1xB0EwboLvIlXG1sPUORL/Y
mMhR8vZZtGudq5yP6iH2oQpEAzisfZEMSJviuQ+rdP2opWyQsWbXRUdwzyv+8J9G
k4fffODDRwj9vJZmtPlFr0ZXri1QmoDeLJkUprIsJficG6bCBUn+HsaMJmXy6ONc
XevOWiQeCGvz8LUnLPECQQDzXmEguwbsCZz36tS7YB4YO069yWJfjFkhbmSwOR6W
QFHanEp2H5CqQAq41OHC9lgd/GOR55VQ3kPyPR4P4ScXAkEA2jGsuGMlmqLQqOAL
BE3dnNCuVTQmMBQtM7VWIQ3pv8svIEFiFTUcYx5XEwABy4cDQidDByC5nAX1BO+k
00En3wJAD9lZofQMI1sM6ehVKk68Jv/VxO5UhbxyIYc6728I2ugdbIs5HjA4D55U
FG1otnWsj2dcZKgcRUP0UNZCGu6iyQJAVDO1TtbcLSfF1FXZioiuDBUwIatlTUqM
AxdorIrc+OnlPtJckoiTcuDDg46OIsfwhvf10utbFY3q90Ov3OKZCwJAf9qwTa5G
4ivUpRWavfD/Krq6ju8/I/k8cgvRlIN3zTAOlgtn1TpTUA2ASHzWLUqBcjyrfqeP
p5Fv8ngo58F7JQ==
-----END PRIVATE KEY-----
`

function RSAdecrypt(data){
  const privateKey = new NodeRSA(_priKey);
  privateKey.setOptions({encryptionScheme: 'pkcs1'});
  var dePassword = privateKey.decrypt(data, 'utf8');//解密 用在登录接口
  return dePassword;
}


module.exports =  RSAdecrypt;